//
//  UIColor+JLY.m
//  Zuisuigirveup
//
//  Created by spdbmacbook0003 on 2025/8/4.
//

#import "UIColor+JLY.h"

@implementation UIColor (JLY)
+(UIColor *)JLYGetColorWithHEX:(NSString *)hex{
    if(hex && hex.length>0){
        unsigned rgbValue = 0;
        NSScanner *scanner = [NSScanner scannerWithString:hex];
        [scanner setScanLocation:1]; // bypass '#' character
        [scanner scanHexInt:&rgbValue];
        UIColor *color = [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:1];
        return color;
    }
    return [UIColor clearColor];
}
@end
